package org.yxs.excel.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.yxs.excel.entity.Product;
import org.yxs.excel.mapper.ProductMapper;
import org.yxs.excel.service.ProductService;

import java.util.List;

@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    private ProductMapper productMapper;

    @Override
    public int add(Product product) {
        return productMapper.add(product);
    }

    @Override
    public int update(Product product) {
        return productMapper.update(product);
    }

    @Override
    public int deleteById(Integer id) {
        return productMapper.deleteById(id);
    }

    @Override
    public Product queryProductById(Integer id) {
        return productMapper.queryProductById(id);
    }

    @Override
    public List<Product> select(Integer id, Integer size) {
        return productMapper.select(id, size);
    }

    @Override
    public int addList(List<Product> products) {
        return productMapper.addList(products);
    }
}
